/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.spreedairy.portal.model;

import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link CustomField}.
 * </p>
 *
 * @author    SpreeDairy
 * @see       CustomField
 * @generated
 */
public class CustomFieldWrapper implements CustomField,
	ModelWrapper<CustomField> {
	public CustomFieldWrapper(CustomField customField) {
		_customField = customField;
	}

	public Class<?> getModelClass() {
		return CustomField.class;
	}

	public String getModelClassName() {
		return CustomField.class.getName();
	}

	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("recId", getRecId());
		attributes.put("categoryId", getCategoryId());
		attributes.put("keyValue", getKeyValue());
		attributes.put("keyType", getKeyType());
		attributes.put("optional", getOptional());
		attributes.put("optionsValue", getOptionsValue());
		attributes.put("fieldOrder", getFieldOrder());

		return attributes;
	}

	public void setModelAttributes(Map<String, Object> attributes) {
		Long recId = (Long)attributes.get("recId");

		if (recId != null) {
			setRecId(recId);
		}

		Long categoryId = (Long)attributes.get("categoryId");

		if (categoryId != null) {
			setCategoryId(categoryId);
		}

		String keyValue = (String)attributes.get("keyValue");

		if (keyValue != null) {
			setKeyValue(keyValue);
		}

		String keyType = (String)attributes.get("keyType");

		if (keyType != null) {
			setKeyType(keyType);
		}

		Boolean optional = (Boolean)attributes.get("optional");

		if (optional != null) {
			setOptional(optional);
		}

		String optionsValue = (String)attributes.get("optionsValue");

		if (optionsValue != null) {
			setOptionsValue(optionsValue);
		}

		Integer fieldOrder = (Integer)attributes.get("fieldOrder");

		if (fieldOrder != null) {
			setFieldOrder(fieldOrder);
		}
	}

	/**
	* Returns the primary key of this custom field.
	*
	* @return the primary key of this custom field
	*/
	public long getPrimaryKey() {
		return _customField.getPrimaryKey();
	}

	/**
	* Sets the primary key of this custom field.
	*
	* @param primaryKey the primary key of this custom field
	*/
	public void setPrimaryKey(long primaryKey) {
		_customField.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the rec ID of this custom field.
	*
	* @return the rec ID of this custom field
	*/
	public long getRecId() {
		return _customField.getRecId();
	}

	/**
	* Sets the rec ID of this custom field.
	*
	* @param recId the rec ID of this custom field
	*/
	public void setRecId(long recId) {
		_customField.setRecId(recId);
	}

	/**
	* Returns the category ID of this custom field.
	*
	* @return the category ID of this custom field
	*/
	public long getCategoryId() {
		return _customField.getCategoryId();
	}

	/**
	* Sets the category ID of this custom field.
	*
	* @param categoryId the category ID of this custom field
	*/
	public void setCategoryId(long categoryId) {
		_customField.setCategoryId(categoryId);
	}

	/**
	* Returns the key value of this custom field.
	*
	* @return the key value of this custom field
	*/
	public java.lang.String getKeyValue() {
		return _customField.getKeyValue();
	}

	/**
	* Sets the key value of this custom field.
	*
	* @param keyValue the key value of this custom field
	*/
	public void setKeyValue(java.lang.String keyValue) {
		_customField.setKeyValue(keyValue);
	}

	/**
	* Returns the key type of this custom field.
	*
	* @return the key type of this custom field
	*/
	public java.lang.String getKeyType() {
		return _customField.getKeyType();
	}

	/**
	* Sets the key type of this custom field.
	*
	* @param keyType the key type of this custom field
	*/
	public void setKeyType(java.lang.String keyType) {
		_customField.setKeyType(keyType);
	}

	/**
	* Returns the optional of this custom field.
	*
	* @return the optional of this custom field
	*/
	public boolean getOptional() {
		return _customField.getOptional();
	}

	/**
	* Returns <code>true</code> if this custom field is optional.
	*
	* @return <code>true</code> if this custom field is optional; <code>false</code> otherwise
	*/
	public boolean isOptional() {
		return _customField.isOptional();
	}

	/**
	* Sets whether this custom field is optional.
	*
	* @param optional the optional of this custom field
	*/
	public void setOptional(boolean optional) {
		_customField.setOptional(optional);
	}

	/**
	* Returns the options value of this custom field.
	*
	* @return the options value of this custom field
	*/
	public java.lang.String getOptionsValue() {
		return _customField.getOptionsValue();
	}

	/**
	* Sets the options value of this custom field.
	*
	* @param optionsValue the options value of this custom field
	*/
	public void setOptionsValue(java.lang.String optionsValue) {
		_customField.setOptionsValue(optionsValue);
	}

	/**
	* Returns the field order of this custom field.
	*
	* @return the field order of this custom field
	*/
	public int getFieldOrder() {
		return _customField.getFieldOrder();
	}

	/**
	* Sets the field order of this custom field.
	*
	* @param fieldOrder the field order of this custom field
	*/
	public void setFieldOrder(int fieldOrder) {
		_customField.setFieldOrder(fieldOrder);
	}

	public boolean isNew() {
		return _customField.isNew();
	}

	public void setNew(boolean n) {
		_customField.setNew(n);
	}

	public boolean isCachedModel() {
		return _customField.isCachedModel();
	}

	public void setCachedModel(boolean cachedModel) {
		_customField.setCachedModel(cachedModel);
	}

	public boolean isEscapedModel() {
		return _customField.isEscapedModel();
	}

	public java.io.Serializable getPrimaryKeyObj() {
		return _customField.getPrimaryKeyObj();
	}

	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_customField.setPrimaryKeyObj(primaryKeyObj);
	}

	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _customField.getExpandoBridge();
	}

	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_customField.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new CustomFieldWrapper((CustomField)_customField.clone());
	}

	public int compareTo(com.spreedairy.portal.model.CustomField customField) {
		return _customField.compareTo(customField);
	}

	@Override
	public int hashCode() {
		return _customField.hashCode();
	}

	public com.liferay.portal.model.CacheModel<com.spreedairy.portal.model.CustomField> toCacheModel() {
		return _customField.toCacheModel();
	}

	public com.spreedairy.portal.model.CustomField toEscapedModel() {
		return new CustomFieldWrapper(_customField.toEscapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _customField.toString();
	}

	public java.lang.String toXmlString() {
		return _customField.toXmlString();
	}

	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_customField.persist();
	}

	/**
	 * @deprecated Renamed to {@link #getWrappedModel}
	 */
	public CustomField getWrappedCustomField() {
		return _customField;
	}

	public CustomField getWrappedModel() {
		return _customField;
	}

	public void resetOriginalValues() {
		_customField.resetOriginalValues();
	}

	private CustomField _customField;
}